//
// CLightContribution.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CRGBA;

public class CLightContribution {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CLightContribution(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CLightContribution obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CLightContribution(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setPointLight(SWIGTYPE_p_p_CPointLight value) {
    nel3dJNI.CLightContribution_PointLight_set(swigCPtr, this, SWIGTYPE_p_p_CPointLight.getCPtr(value));
  }

  public SWIGTYPE_p_p_CPointLight getPointLight() {
    long cPtr = nel3dJNI.CLightContribution_PointLight_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_p_CPointLight(cPtr, false);
  }

  public void setTransformIterator(SWIGTYPE_p_CPointLight__ItTransformList value) {
    nel3dJNI.CLightContribution_TransformIterator_set(swigCPtr, this, SWIGTYPE_p_CPointLight__ItTransformList.getCPtr(value));
  }

  public SWIGTYPE_p_CPointLight__ItTransformList getTransformIterator() {
    long cPtr = nel3dJNI.CLightContribution_TransformIterator_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_CPointLight__ItTransformList(cPtr, false);
  }

  public void setFactor(SWIGTYPE_p_unsigned_char value) {
    nel3dJNI.CLightContribution_Factor_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
  }

  public SWIGTYPE_p_unsigned_char getFactor() {
    long cPtr = nel3dJNI.CLightContribution_Factor_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public void setAttFactor(SWIGTYPE_p_unsigned_char value) {
    nel3dJNI.CLightContribution_AttFactor_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
  }

  public SWIGTYPE_p_unsigned_char getAttFactor() {
    long cPtr = nel3dJNI.CLightContribution_AttFactor_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
  }

  public void setLocalAmbient(CRGBA value) {
    nel3dJNI.CLightContribution_LocalAmbient_set(swigCPtr, this, CRGBA.getCPtr(value), value);
  }

  public CRGBA getLocalAmbient() {
    long cPtr = nel3dJNI.CLightContribution_LocalAmbient_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CRGBA(cPtr, false);
  }

  public void setFrozenStaticLightSetup(boolean value) {
    nel3dJNI.CLightContribution_FrozenStaticLightSetup_set(swigCPtr, this, value);
  }

  public boolean getFrozenStaticLightSetup() {
    return nel3dJNI.CLightContribution_FrozenStaticLightSetup_get(swigCPtr, this);
  }

  public void setNumFrozenStaticLight(short value) {
    nel3dJNI.CLightContribution_NumFrozenStaticLight_set(swigCPtr, this, value);
  }

  public short getNumFrozenStaticLight() {
    return nel3dJNI.CLightContribution_NumFrozenStaticLight_get(swigCPtr, this);
  }

  public void setSunContribution(short value) {
    nel3dJNI.CLightContribution_SunContribution_set(swigCPtr, this, value);
  }

  public short getSunContribution() {
    return nel3dJNI.CLightContribution_SunContribution_get(swigCPtr, this);
  }

  public void setUseMergedPointLight(boolean value) {
    nel3dJNI.CLightContribution_UseMergedPointLight_set(swigCPtr, this, value);
  }

  public boolean getUseMergedPointLight() {
    return nel3dJNI.CLightContribution_UseMergedPointLight_get(swigCPtr, this);
  }

  public void setFrozenAmbientLight(CPointLight value) {
    nel3dJNI.CLightContribution_FrozenAmbientLight_set(swigCPtr, this, CPointLight.getCPtr(value), value);
  }

  public CPointLight getFrozenAmbientLight() {
    long cPtr = nel3dJNI.CLightContribution_FrozenAmbientLight_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CPointLight(cPtr, false);
  }

  public void setMergedPointLight(CRGBA value) {
    nel3dJNI.CLightContribution_MergedPointLight_set(swigCPtr, this, CRGBA.getCPtr(value), value);
  }

  public CRGBA getMergedPointLight() {
    long cPtr = nel3dJNI.CLightContribution_MergedPointLight_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CRGBA(cPtr, false);
  }

  public CLightContribution() {
    this(nel3dJNI.new_CLightContribution(), true);
  }

  public CRGBA computeCurrentAmbient(CRGBA sunAmbient) {
    return new CRGBA(nel3dJNI.CLightContribution_computeCurrentAmbient(swigCPtr, this, CRGBA.getCPtr(sunAmbient), sunAmbient), true);
  }

}
